03. Rotation Matrices in 2D
Rotation Matrices in 2D
Rotation matrices have two conceptual, but mathematically equivalent, interpretations. They can be viewed as a means of "expressing" a vector in one coordinate frame in terms of some other coordinate frame. This interpretation is known as a “mapping” between frames.
Alternatively, a rotation matrix can be seen as an “operator” that actually moves a vector within a single coordinate frame. It is important to be aware of this conceptual distinction because the particular application will dictate which description is used, but do not let it confuse you: it’s the same math!
Let’s again consider a vector, v, with respect to reference frames A and B and take a more formal look at how to express v, whose measure numbers we may know in frame A, in terms of frame B.
If we dot equation (1) with \bold{\hat{a}_x} we get:
Since \bold{\hat{a}_x} and \bold{\hat{a}_y} are orthogonal unit vectors so \bold{\hat{a}_x} \cdot \bold{\hat{a}_x}=1
and \bold{\hat{a}_x} \cdot \bold{\hat{a}_y}=0 so equation (2) simplifies to:
Similarly, if we dot equation (1) with \bold{\hat{a}_{y}} and simplify, we get
We can arrange equations (3) and (4) into a more compact matrix form,
Rotation in 2D
SOLUTION:
The first term on the right-hand side of the equality in equation (5) is known as a rotation matrix and is generally written in a more compact form, ^{a}_{b}{R} .
Examining the columns of the rotation matrix, you can see that they are in fact the basis vectors of frame B expressed in terms of the frame A. That is,
Looking carefully, you may also notice something else: the rows of ^{a}{b}{R} are the projection of the _A-frame onto B,
This relationship is interesting because it implies that the rotation from A to B is equal to the transpose of the rotation of B to A. In fact, because rotation matrices are orthonormal matrices (composed of orthogonal unit vectors), they have several useful properties that, for the sake of brevity, we summarize without proof.
Important properties of the rotation matrix, ^{A}_{B}{R} :
The determinant is equal to +1 (assuming a right-handed coordinate system).
Columns (and rows) are mutually orthogonal unit vectors, therefore, the magnitude of any column (or row) is equal to one and the dot product of any two columns (or rows) is equal to zero
The columns define the basis vectors (i.e., x, y, z axes) of the rotated frame relative to the base frame
Adding one more dimension
So far, we've only considered rotations in two dimensions but the same properties apply to three-dimensional rotations! In three dimensions, the rotation matrix looks like this:
Given the properties of rotation matrices listed above, which of the following are valid 3-dimensional rotation matrices?
SOLUTION:
- \begin{bmatrix} \frac{\sqrt{3}}{2}& 0 & \frac{-1}{2}\\ 0& 1 & 1 \\ \frac{1}{2}& 0 & \frac{\sqrt{3}}{2} \end{bmatrix}
- \begin{bmatrix} \frac{\sqrt{1}}{2}& \frac{\sqrt{3}}{2} & 0\\ \frac{-\sqrt{3}}{2}& \frac{\sqrt{1}}{2} & 0\\ 0& 0 & 1 \end{bmatrix}